package com.aw.qzblog.controller;

import com.aw.qzblog.common.Result;
import com.aw.qzblog.entity.dto.article.CreateArticleRequest;
import com.aw.qzblog.service.ArticleService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/article")
public class ArticleController {

    @Resource
    private ArticleService articleService;


    @PostMapping("/push")
    public Result pushArticle(@RequestBody CreateArticleRequest createArticleRequest) {
        return articleService.pushArticle(createArticleRequest);
    }

}
